package com.rc.pojo.po.table;

import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.table.TableDef;

// Auto generate by mybatis-flex, do not modify it.
public class TaskTableDef extends TableDef {

    /**
     * 实体类。

 @author 27806
 @since 2024-07-09
     */
    public static final TaskTableDef TASK = new TaskTableDef();

    public final QueryColumn ID = new QueryColumn(this, "id");

    public final QueryColumn TITLE = new QueryColumn(this, "title");

    public final QueryColumn AREA_ID = new QueryColumn(this, "area_id");

    public final QueryColumn FARM_ID = new QueryColumn(this, "farm_id");

    public final QueryColumn FINISH = new QueryColumn(this, "finish");

    public final QueryColumn CONTENT = new QueryColumn(this, "content");

    public final QueryColumn CREATE_TIME = new QueryColumn(this, "create_time");

    public final QueryColumn UPDATE_TIME = new QueryColumn(this, "update_time");

    /**
     * 所有字段。
     */
    public final QueryColumn ALL_COLUMNS = new QueryColumn(this, "*");

    /**
     * 默认字段，不包含逻辑删除或者 large 等字段。
     */
    public final QueryColumn[] DEFAULT_COLUMNS = new QueryColumn[]{ID, TITLE, AREA_ID, FARM_ID, FINISH, CONTENT, CREATE_TIME, UPDATE_TIME};

    public TaskTableDef() {
        super("rc", "task");
    }

    private TaskTableDef(String schema, String name, String alisa) {
        super(schema, name, alisa);
    }

    public TaskTableDef as(String alias) {
        String key = getNameWithSchema() + "." + alias;
        return getCache(key, k -> new TaskTableDef("rc", "task", alias));
    }

}
